package com.wzz.common.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.RotateAnimation;

import com.hymobile.common.R;
import com.wzz.common.animation.ReverseAnimation;

public class RollAnimationActivity extends Activity {

  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.roll_animation);
  }

  private boolean reverse;
  public void onImageClick(View view) {
    RotateAnimation ro = new RotateAnimation(0, 180 * 2, 1, 0.5f, 1, 0.5f);
    ro.setDuration(1800);
    view.startAnimation(reverse ? new ReverseAnimation(ro) : ro);
    reverse = !reverse;
  }
  
}
